#ifndef NODE_H
#define NODE_H
#include <stdlib.h>
#include <iostream>
#include <algorithm>

#include "nodegraphics.h"


class Node
{
public:
    Node();
    Node(const Node &n);
    Node(int row_, int col_);
    Node(int row_, int col_,Node *parent_);
    friend std::ostream&  operator<< (std::ostream&  s, const Node & n);
    bool operator<(const Node &b) const;
    bool operator==(const Node &b) const;
    Node & operator=(const Node &b);
    double getCost();
    int row,col;
    Node *parent;
    NodeGraphics *graph;
    double g,h;
};

struct NodeLess
        : std::binary_function<const Node*, const Node*, bool>
{
    bool operator() (const Node* lhs, const Node* rhs ) const
    {
        return (*lhs) < *(rhs);
    }
};


#endif // NODE_H
